<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>13-2 浅拷贝：jquery提供$.extend</title>
</head>

<body>
  <!-- <script src="../../node_modules/jquery/dist/jquery.min.js"></script> -->
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script>
    let obj1 = { name: 'Henry', arr: [1, 2, 4] }

    let obj2 = $.extend(false, {}, obj1)

    console.log(obj2)
    console.log(obj2 === obj1) //=> false 
    console.log(obj2.arr === obj1.arr) //=> true
  </script>
</body>

</html>